
document.onreadystatechange = dosome;//当页面加载状态改变的时候执行这个方法. 
        function dosome() {
            if(document.readyState == "complete"){ //当页面加载状态完成  
                //document.getElementById("m").play();
                document.getElementById("loading").style.display="none";            
                document.getElementById("wrap").style.display="block";                
            }           
        }
    ts='slideCoverOut';
    var a=new pageSwitch('imgs',{
            duration:500,
            start:0,
            direction:1,
            loop:false,
            ease:'linear',
            transition:ts,
            mouse:true,
            mousewheel:true,
            arrowkey:true,
            freeze:false,
        })

a.on('before',function(m,n){
    navs[m].className='';
    navs[n].className='active';
});

navs=document.getElementById('navs').getElementsByTagName('a'); 

i=0;
for(;i<navs.length;i++){
	!function(i){
		navs[i].onclick=function(){
			a.slide(i);
		}
	}(i);
}
